package com.goktech.olala.core.service.impl;

import com.goktech.olala.core.service.ICustomerLoginService;
import com.goktech.olala.server.dao.customer.CustomerLoginMapper;
import com.goktech.olala.server.pojo.customer.CustomerLogin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Classname ICustomerLoginServiceImp
 * @Description TODO
 * @Date 2020/12/13 11:32
 * @Created by ASUS
 */
@Service
public class ICustomerLoginServiceImp implements ICustomerLoginService {

    @Autowired
    CustomerLoginMapper customerLoginMapper;

    @Override
    public int insert(CustomerLogin record) {
        int insert = customerLoginMapper.insert(record);
        return insert;
    }

    @Override
    public List<CustomerLogin> selectAll() {
        List<CustomerLogin> customerLoginList = customerLoginMapper.selectAll();
        return customerLoginList;
    }

    @Override
    public CustomerLogin selectCustomer(String userName, String password) {
        CustomerLogin customerLogin = customerLoginMapper.selectCustomer(userName, password);
        return customerLogin;
    }
}
